import React from 'react';
import {Text, View} from 'react-native';
import PropTypes from 'prop-types';

class TableCellSubTitle extends React.Component {
    render(): React.ReactNode {
        return (
            <View style={{
                marginTop: 10,
                justifyContent: 'center',
                ...this.props.style
            }}>
                <Text style={{
                    fontSize: 14,
                    color: '#666',
                    textAlignVertical: 'center',
                    ...this.props.titleStyle
                }}>{this.props.title}</Text>
            </View>
        );
    }
}

TableCellSubTitle.propTypes = {
    title: PropTypes.string,
    style: PropTypes.object,
    titleStyle: PropTypes.object,
}

TableCellSubTitle.defaultProps = {
    style: {},
    titleStyle: {},
}

export default TableCellSubTitle;
